package com.oig.sys.base.app.impl;

import com.oig.sys.base.app.IAppHarborService;
import com.oig.sys.base.dto.HarborDto;
import com.oig.sys.base.service.ITbHarborService;
import com.oig.sys.base.vo.HarborVo;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@RequiredArgsConstructor
public class AppHarborServiceImpl implements IAppHarborService {

    private final ITbHarborService harborService;

    @GlobalTransactional
    @Override
    public HarborVo addTbHarbor(HarborDto harborDto) {
        return this.harborService.addTbHarbor(harborDto);
    }

    @GlobalTransactional
    @Override
    public HarborVo updateTbHarbor(HarborDto harborDto) {
        return this.harborService.updateTbHarbor(harborDto);
    }

    @GlobalTransactional
    @Override
    public void cancelTbHarbor(Integer id) {
       this.harborService.cancelTbHarbor(id);
    }

}
